package homeWork06;

import java.util.Scanner;

public class Main {
        public static void main(String[] args) {
                Scanner in=new Scanner(System.in);
                Car car = null;
                System.out.println("车型如下:");
                System.out.println("1.轿车");
                System.out.println("2.客车");
                System.out.println("请选择:");
                int n=in.nextInt();
                switch (n){
                    case 1:
                        System.out.println("请选择轿车的品牌:");
                        System.out.println("1.宝马");
                        System.out.println("2.别克");
                        System.out.println("请选择:");
                        n=in.nextInt();
                        switch (n){
                            case 1:
                                System.out.println("800元/天");
                                car = new Jiaoche("宝马",800);
                                break;
                            case 2:
                                System.out.println("300元/天");
                                car = new Jiaoche("别克",300);
                                break;
                        }
                        break;
                    case 2:
                        System.out.println("请选择客车的座位数:");
                        System.out.println("1.15坐以下");
                        System.out.println("2.15坐以上");
                        System.out.println("请选择:");
                        n=in.nextInt();
                        switch (n){
                            case 1:
                                System.out.println("500元/天");
                                car = new Keche("金杯",500);
                                break;
                            case 2:
                                System.out.println("1200元/天");
                                car = new Keche("金龙",1200);
                                break;
                        }
                        break;
                }
                System.out.println("请输入租赁天数:");
                n=in.nextInt();
                ZuLinGongSi.sellCar(car,n);
        }
}
